package thread;

public class work_demo_back {
    public static void main(String[] args) throws InterruptedException {
        for (int i = 0;i<20;i++){
            int j = i;
            Thread t = new Thread(()->{
                System.out.println(j);
            });
            t.start();
            t.join();
        }
        System.out.println("ok");


  }
}